select count(ID), sourceentity from vwNotes group by sourceentity

select count(ID), whocreated from vwNotes group by whocreated

select count(vwnotes.ID), whocreated from vwNotes
inner join vwUsers on vwUsers.UserID=vwNotes.WhoCreated
where vwUsers.IsActive=1
group by whocreated


select count(vwnotes.ID), year(DateCreated) from vwNotes group by year(DateCreated) order by year(DateCreated) desc